package com.chinamobile.iot.handler.redis;

import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;

/**
 * Created by szl on 2017/7/19.
 */
@Configuration
public class RedisConfiguration {

    @Bean
    @ConditionalOnExpression("${mqtt.distribute}")
    public RedisMessageListenerContainer container() {
        return new RedisMessageListenerContainer();
    }

}
